import request from '@/utils/request'

export function getDeviceList(params) {
  return request({
    url: '/device/getList',
    method: 'get',
    params
  })
}

export function addDevice(data){
  return request({
    url:'/device/add',
    method: 'post',
    data
  })
}

export function editDevice(data){
  return request({
    url:'/device/edit',
    method: 'post',
    data
  })
}

export function delDevice(data){
  return request({
    url:'/device/del',
    method: 'post',
    data
  })
}

export function getDeviceOnlineList(params){
  return request({
    url:'/device/getDeviceOnlineList',
    method:'get',
    params
  })
}

export function getDeviceGroupList(params) {
  return request({
    url: '/device_group/getList',
    method: 'get',
    params
  })
}

export function getDeviceGroupListById(params) {
  return request({
    url: '/device_group/getDeviceGroupById',
    method: 'get',
    params
  })
}

export function addDeviceGroup(data){
  return request({
    url:'/device_group/add',
    method: 'post',
    data
  })
}

export function editDeviceGroup(data){
  return request({
    url:'/device_group/edit',
    method: 'post',
    data
  })
}

export function delDeviceGroup(data){
  return request({
    url:'/device_group/del',
    method: 'post',
    data
  })
}
